Repository navigation
fix(live): refuse live peers from Claude Code subagents; stop claims late Codex registrations - #180
Merged
Merged
Conversation
…e up A Codex held on its hooks-trust prompt past the spawn timeout registered once someone answered it, but its spawned.json row kept an empty address: `live stop` listed it as never registered and refused it by address. Spawn now records the harness sessions running before the start, and `live stop` gives each running row without an address the new session in its folder that no row claims yet.
A subagent shares its parent's process and environment (verified: the full env is identical), so whoami named the parent and every peer reply landed in the parent's conversation. The shell Claude Code's Bash tool starts is matched against the in-flight Bash calls of the session's transcripts; a match in subagents/agent-<id>.jsonl refuses with the fix: spawn the lead with `live spawn claude`, or use the board. MCP calls have no shell and stay undetected, as documented.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two live-relay bugs seen when a Claude Code session ran peers through in-process subagents.
Subagents could not be live peers. A subagent (Agent tool) shares its parent's process and environment, so
live whoaminamed the parent session,live spawnheaded the peers' briefs with that address, and every reply landed in the parent's conversation. The fullenvof a main session and of its subagent are identical, so no env var tells them apart. What does: Claude Code writes a Bash call'stool_useline to the transcript before starting its shell.router.subagent_callertakes the command line of the shell Claude Code started and matches it against the in-flight Bash calls of<session>.jsonland<session>/subagents/agent-<id>.jsonl. A match in a subagent file makeslive whoami,live sendandlive spawnrefuse, naming the fix: spawn the lead withlive spawn claude, or use the board. Limit: MCP tool calls have no shell, so a subagent calling them is not detected (documented in README and SKILL.md).Verified end to end: in a
claude -pmain sessionlive whoamiprinted its address; in a subagent of that same session it refused withThis runs inside Claude Code subagent a5fc55066a385ca2b ....live stoplisted spawned Codex agents as "(never registered)". Codex waited on its hooks-trust prompt ("Review hooks / Trust all and continue") past the 120 s spawn timeout, so spawn exited and itsspawned.jsonrow kept an empty address. Once the prompt was answered, Codex registered, but nothing wrote the address back:live stoplisted it as never registered and refused it by address. Spawn now records the session ids running before the start, andlive stopgives each running row without an address the new session in its folder that no other row claims.Nothing to do before merge or deploy.